package au.com.nh.unit;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

import java.io.IOException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.junit.Test;

import au.com.nh.NhServlet;

public class PersonTest {

	@Test
	public void testNameStoredCorrectly() {
		final NhServlet realServlet = new NhServlet();
		final HttpServletRequest request = mock(HttpServletRequest.class);
		final HttpServletResponse response = mock(HttpServletResponse.class);
		try {
			realServlet.doGet(request, response);
		} catch (final IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		verify(response).setContentType("text/plain");

	}
}
